$(document).ready( function(){

	// set all forms to submit on enter
	$("form").keypress( function(e){
		if( e.keyCode == 13 ){
			$(this).submit();
			return false;
		}
	});

	// setup AdminBlock to toggle visibility
	$('#CopyrightLine').hover(
		function(){ $('div.AdminBlock').toggle(); },
		function(){}
	);
	// set error list to toggle and indicator to change
	$("span.Indicator a").click( function(){
		//e.preventDefault();
		if( $(this).html() == '[+]' ){
			$(this).html('[-]');
		}else{
			$(this).html('[+]');
		}
		$("div.AdminBlock .GXErrors .List").toggle();
	});
	// set username to have help text
	if( $("#LoginForm input[@type='text']").val() == '' ){
		$("#LoginForm input[@type='text']").val('Username');
	}
	// set the username help text behavior
	$("#LoginForm input[@type='text']").focus( function(){
		if( $(this).val() == 'Username' ){
			$(this).val('');
		}
	});
	$("#LoginForm input[@type='text']").blur( function(){
		if( $(this).val() == '' ){
			$(this).val('Username');
		}
	});

});